From: Jim Blandy Date: Tue, 18 May 1993 22:24:14 +0000 (+0000) Subject: * xterm.c (XTread_socket): Turn off ControlMask for XLookupString. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96193 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=5a1c6df8cdf0f6e5b2498591c14d280ee671191c;p=emacs.git * xterm.c (XTread_socket): Turn off ControlMask for XLookupString. * keyboard.c (make_lispy_event): Controlify here. --- diff --git a/src/keyboard.c b/src/keyboard.c index bd418433489..b6313ab7b12 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2090,11 +2090,16 @@ make_lispy_event (event) case ascii_keystroke: { int c = XFASTINT (event->code); - /* Include the bits for control and shift - only if the basic ASCII code can't indicate them. */ - if ((event->modifiers & ctrl_modifier) - && c >= 040) - c |= ctrl_modifier; + /* Turn ASCII characters into control characters + when proper. */ + if (event->modifiers & ctrl_modifier) + { + if (c >= 0100 && c < 0140) + c &= ~040; + /* Include the bits for control and shift + only if the basic ASCII code can't indicate them. */ + c |= ctrl_modifier; + } /* Set the shift modifier for a control char made from a shifted letter. But only for letters! */ if (XFASTINT (event->code) >= 'A' - 0100